package cn.online.qa.repository;

import cn.online.qa.entity.Questions;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface QuestionsRepository extends JpaRepository<Questions,Long>, JpaSpecificationExecutor<Questions> {

        @Modifying
        @Query("update Questions set answercount=?2 where id=?1")
        public  int addanswerCount(long id, int answerCount);

}
